/*** Eclipse Class Decompiler plugin, copyright (c) 2012 Chao Chen (cnfree2000@hotmail.com) ***/
package com.qihoo.c.a.a;

public class a {
    private final String a;
    private final b b;
    private final com.qihoo.c.a.a.a.b c;

    public a(String paramString, com.qihoo.c.a.a.a.b paramb) {
        if (paramString == null)
            throw new IllegalArgumentException("Name may not be null");
        if (paramb == null)
            throw new IllegalArgumentException("Body may not be null");
        this.a = paramString;
        this.c = paramb;
        this.b = new b();
        a(paramb);
        b(paramb);
        c(paramb);
    }

    public String a() {
        return this.a;
    }

    public com.qihoo.c.a.a.a.b b() {
        return this.c;
    }

    public b c() {
        return this.b;
    }

    public void a(String paramString1, String paramString2) {
        if (paramString1 == null)
            throw new IllegalArgumentException("Field name may not be null");
        this.b.a(new f(paramString1, paramString2));
    }

    protected void a(com.qihoo.c.a.a.a.b paramb) {
        StringBuilder localStringBuilder = new StringBuilder();
        localStringBuilder.append("form-data; name=\"");
        localStringBuilder.append(a());
        localStringBuilder.append("\"");
        if (paramb.b() != null) {
            localStringBuilder.append("; filename=\"");
            localStringBuilder.append(paramb.b());
            localStringBuilder.append("\"");
        }
        a("Content-Disposition", localStringBuilder.toString());
    }

    protected void b(com.qihoo.c.a.a.a.b paramb) {
        StringBuilder localStringBuilder = new StringBuilder();
        localStringBuilder.append(paramb.a());
        if (paramb.c() != null) {
            localStringBuilder.append("; charset=");
            localStringBuilder.append(paramb.c());
        }
        a("Content-Type", localStringBuilder.toString());
    }

    protected void c(com.qihoo.c.a.a.a.b paramb) {
        a("Content-Transfer-Encoding", paramb.d());
    }
}